<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:fragment="head(title)">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title th:replace="${title}">母版页</title>
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
    <link rel="stylesheet" type="text/css" href="../static/css/typo.css" th:href="@{/css/typo.css}">
    <link rel="stylesheet" type="text/css" href="../static/css/animate.css" th:href="@{/css/animate.css}">
    <link rel="stylesheet" type="text/css" href="../static/lib/prism/prism.css" th:href="@{/lib/prism/prism.css}">
    <link rel="stylesheet" type="text/css" href="../static/lib/tocbot/tocbot.css" th:href="@{/lib/tocbot/tocbot.css}">
    <link rel="stylesheet" type="text/css" href="../static/css/me.css" th:href="@{/css/me.css}">
    <link rel="stylesheet" type="text/css" href="../static/css/new.css" th:href="@{/css/new.css}">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css">
    <style>
        #waifu-tips{
            z-index: 99999 !important;
        }


        #live2d{
            -webkit-transform: rotate(90deg);/*Safari 4+,Google Chrome 1+ */
            -moz-transform: rotate(90deg);/*Firefox 3.5+*/
            filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);/*ie*/
            height: 280px !important;
            width: 280px !important;
        }
        #waifu{
            bottom: 25% !important;
            -moz-animation:myfirst 5s; /* Firefox */
            -webkit-animation:myfirst 5s; /* Safari and Chrome */
            -o-animation:myfirst 5s; /* Opera */
        }
        @keyframes myfirst
        {
            0%   {opacity:0.1;}
            25%  {opacity:0.4;}
            50%  {opacity:0.7;}
            100% {opacity:1;}
        }

        @-moz-keyframes myfirst /* Firefox */
        {
            0%   {opacity:0.1;}
            25%  {opacity:0.4;}
            50%  {opacity:0.7;}
            100% {opacity:1;}
        }

        @-webkit-keyframes myfirst /* Safari 和 Chrome */
        {
            0%   {opacity:0.1;}
            25%  {opacity:0.4;}
            50%  {opacity:0.7;}
            100% {opacity:1;}
        }

        @-o-keyframes myfirst /* Opera */
        {
            0%   {opacity:0.1;}
            25%  {opacity:0.4;}
            50%  {opacity:0.7;}
            100% {opacity:1;}
        }

        #starIframe_wrapper_1{
            z-index: 999 !important;
        }
    </style>

</head>
<body>


<!--导航-->
<div>
    <nav th:fragment="menu(n)" class="ui inverted attached segment m-padded-tb-mini m-shadow-small">
        <img src="../static/images/logo.png" th:src="@{/images/logo.png}" width="63px" height="63px" style="float: left;margin-left: 50px;margin-top: 5px">
        <div class="ui container">
            <div class="ui inverted secondary stackable menu animated fadeInRight">
                <h2 class="ui violet header item"><i class="ui blue header">Liang</i>Blog</h2>
                <a href="#" th:href="@{/}" class="m-item item m-mobile-hide " th:classappend="${n==1} ? 'active'"><i class="mini home icon"></i>首页</a>
                <a href="#" th:href="@{/types/-1}" class="m-item item m-mobile-hide" th:classappend="${n==2} ? 'active'"><i class="mini idea icon"></i>分类</a>
                <a href="#" th:href="@{/tags/-1}" class="m-item item m-mobile-hide" th:classappend="${n==3} ? 'active'"><i class="mini tags icon"></i>标签</a>
                <a href="#" th:href="@{/archives}" class="m-item item m-mobile-hide" th:classappend="${n==4} ? 'active'"><i class="mini clone icon"></i>时间轴</a>
                <a href="#" th:href="@{/about}" class="m-item item m-mobile-hide" th:classappend="${n==5} ? 'active'"><i class="mini info icon"></i>关于我</a>
                <div class="right m-item item m-mobile-hide" style="border: 0.2em dashed #cccccc;padding: 0.2em;position: relative;left: 5%;">
                    <form name="search" action="#" th:action="@{/search}" method="post" target="_blank">
                        <div class="ui icon inverted transparent input m-margin-tb-tiny">
                            <input type="text" name="query" placeholder="在这里进行搜索哦~" th:value="${query}">
                            <i onclick="document.forms['search'].submit()" class="search link icon"></i>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
            <i class="sidebar icon"></i>
        </a>
    </nav>
</div>



<!--底部footer-->

<footer th:fragment="footer" class="ui inverted vertical segment m-padded-tb-massive animated bounceIn" style="opacity: 0.8 !important;">
    <!--    固定定位导航栏-->
    <div id="toolbar" class="m-padded m-fixed m-right-bottom">
        <div class="ui vertical icon buttons ">
            <a href="#" th:href="@{/admin}" target="_blank" class="admin-btn ui icon button blue" ><i class="shield alternate icon"></i></a>

            <div id="toTop-button" class="ui icon button" ><i class="chevron up icon"></i></div>
        </div>
        <div class="ui flowing admin-qr popup transition hidden" style="width: 100px;">
            <span>后台管理</span>
        </div>
    </div>

    <div class="ui center aligned container">
        <div class="ui inverted divided stackable grid">
            <div class="three wide column">
                <div class="ui inverted link list">
                    <div class="item">
                        <img src="../static/images/wc.jpg" th:src="@{/images/wc.jpg}"  class="ui rounded image" alt="" style="width: 110px">
                    </div>
                </div>
            </div>
            <div class="three wide column" >
                <h4 class="ui inverted header m-text-thin m-text-spaced " >最新博客</h4>
                <div id="newblog-container">
                    <div class="ui inverted link list" th:fragment="newblogList">
                        <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" class="item m-text-thin" th:each="blog : ${newblogs}" th:text="${blog.title}">用户故事（User Story）</a>
                        <!--/*-->
                        <a href="#" class="item m-text-thin">用户故事（User Story）</a>
                        <a href="#" class="item m-text-thin">用户故事（User Story）</a>
                        <!--*/-->
                    </div>
                </div>
            </div>
            <div class="three wide column">
                <h4 class="ui inverted header m-text-thin m-text-spaced ">联系我</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item m-text-thin" th:text="#{index.email}">Email：60968622@qq.com</a>
                    <a href="#" class="item m-text-thin" th:text="#{index.qq}">QQ：609688622</a>
                </div>
            </div>
            <div class="seven wide column">
                <h4 class="ui inverted header m-text-thin m-text-spaced ">LiangBlog</h4>
                <p class="m-text-thin m-text-spaced m-opacity-mini">
                    这是我的个人博客、记录学习进度和关于编程、思考相关的任何内容...
                </p>

            </div>
        </div>
        <div class="ui inverted section divider"></div>
        <p id="createBlog_time" class="m-text-thin m-text-spaced m-opacity-tiny" style="color: rgb(10,255,79)"></p>
        <p class="m-text-thin m-text-spaced m-opacity-tiny">Copyright © 2020 - <span th:text="${#dates.year(#dates.createNow())}">2020</span> wjl Designed by wjl</p>
    </div>

    <!--    定时器计算建站时间-->
    <script>
        function siteTime() {
            //创建时间
            BirthDay = new Date("5/31/2020 22:58:10");
            //获取当前时间
            today = new Date();
            timeold = (today.getTime() - BirthDay.getTime()); //总豪秒数
            secondsold = Math.floor(timeold / 1000);          //总秒数
            e_daysold = timeold / (24 * 60 * 60 * 1000);
            daysold = Math.floor(e_daysold);                 //相差天数
            e_hrsold = (e_daysold - daysold) * 24;
            hrsold = Math.floor(e_hrsold);                   //相差小时数
            e_minsold = (e_hrsold - hrsold) * 60;
            minsold = Math.floor(e_minsold)                   //相差分钟数
            seconds = Math.floor((e_minsold - minsold) * 60);  //相差秒数
            document.getElementById("createBlog_time").innerHTML = "本站已经运行" + daysold + "天" + hrsold + "小时" + minsold + "分钟" + seconds + "秒";
        }
        setInterval(siteTime, 1000);
    </script>

</footer>

<th:block th:fragment="script">
    <div class="aplayer" data-id="2425714420" data-server="netease" data-type="playlist" data-fixed="true" data-autoplay="false"  data-volume="0.6" ></div>
    <script src="http://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.js"></script>
    <script src="http://cdn.jsdelivr.net/npm/meting@1.2.0/dist/Meting.min.js"></script>
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/jquery.scrollto@2.1.2/jquery.scrollTo.min.js"></script>
    <script src="https://cdn.jsdelivr.net/gh/stevenjoezhang/live2d-widget@latest/autoload.js"></script>
    <script src="../static/lib/prism/prism.js" th:src="@{/lib/prism/prism.js}"></script>
    <script src="../static/lib/tocbot/tocbot.min.js" th:src="@{/lib/tocbot/tocbot.min.js}"></script>
    <script src="../static/lib/qrcode/qrcode.min.js" th:src="@{/lib/qrcode/qrcode.min.js}"></script>
    <script src="../static/lib/waypoints/jquery.waypoints.min.js" th:src="@{/lib/waypoints/jquery.waypoints.min.js}"></script>
    <script>
        $('#newblog-container').load(/*[[@{/footer/newblog}]]*/"/footer/newblog");
        $('#toTop-button').click(function () {
            $(window).scrollTo(0,500);
        });
        $('.admin-btn')
            .popup({
                popup : $(".admin-qr"),
                on    : 'hover',
                position: "right center"
            })
        ;
    </script>
</th:block>

</body>
</html>